﻿/*创建人：盛金龙
 */
using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Text;
using System.Drawing;
using Maticsoft.DBUtility;
using EnvironmentManagerSystem.MODE;
using EnvironmentManagerSystem.BLL;

namespace EnvironmentManagerSystem.HuanJing
{
    public partial class HuanJing_main : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (StfInfo.ReSession()) return; if (!IsPostBack)
            {
                RoleID.Text = Session["roleid"].ToString();
                if (RoleID.Text == "建设单位")
                {
                    jianshe.Visible = true;
                    Panel1.Visible = false;
                }
                else
                {
                    jianshe.Visible = false;
                    Panel1.Visible = true;
                }
                Session["where"] = Request["where"] == null ? "" : Request["where"].ToString();
                DBBing();
                #region MyRegion
                Label1.Text = Session["pjName"].ToString();
                Bind();
                if (!Session["roleid"].ToString().Contains("建设单位"))
                {
                    btn.Visible = false;
                }
                #endregion
            }
        }
        #region MyRegion(x)
        public void Bind()
        {
            try
            {
                if (Session["pjName"] != null && !Session["pjName"].ToString().Equals("") && !Session["pjName"].ToString().Equals("无"))
                {
                    DevelopprojectbasicinfoDataCollection lst = BLL.XIANGMU.GetByProjectName(Session["pjName"].ToString());
                    if (lst.Count > 0)
                    {
                        //受理状态
                        if (lst[0].xiangmushouliren != null && lst[0].xiangmushouliren != "" && lst[0].shoulituihuishanchu == 1)
                        {

                            xiangmushouliren.Text = string.Format("已受理");
                            Image1.ImageUrl = "~/images/bookmark-2.ico";
                            //受理时间 
                            xiangmushoulishijian.Text = lst[0].xiangmushoulishijian.ToString();

                        }
                        else
                        {
                            xiangmushouliren.Text = "未受理";
                            Image1.ImageUrl = "~/images/white-star.png";
                            xiangmushoulishijian.Text = "";
                        }
                        //项目分配状态
                        if (lst[0].fenpeiquerenren != null && lst[0].fenpeiquerenren != "")
                        {
                            if (XIANGMU.WhetherLeader(lst[0].fenpeiquerenren.ToString()))
                            {
                                fenpeiquerenren.Text = string.Format("已确认");
                                Image2.ImageUrl = "~/images/bookmark-2.ico";
                                //项目分配日期
                                fenpeiquerenshijian.Text = lst[0].fenpeiquerenshijian.ToString();
                                //用时几天
                                DateTime DateTime1 = Convert.ToDateTime(lst[0].xiangmushoulishijian.ToString());//起始时间
                                DateTime DateTime2 = Convert.ToDateTime(lst[0].fenpeiquerenshijian.ToString());//结束时间                                
                                string dateDiff1 = null;
                                TimeSpan ts1 = new TimeSpan(DateTime1.Ticks);
                                TimeSpan ts2 = new TimeSpan(DateTime2.Ticks);
                                TimeSpan ts3 = ts1.Subtract(ts2).Duration();
                                int ts33 = NoticeService.ProNoticeDays(lst[0].fenpeiquerenshijian.ToString(), lst[0].xiangmushoulishijian.ToString());
                                //显示时间
                                dateDiff1 = "用时" + (ts3.Days + 1 - ts33).ToString() + "天";
                                Time2.Text = dateDiff1;
                                Time2.Visible = true;
                            }

                            else
                            {
                                fenpeiquerenren.Text = string.Format("已处理");
                                Image2.ImageUrl = "~/images/white-star.png";
                                //项目分配日期
                                fenpeiquerenshijian.Text = lst[0].fenpeiquerenshijian.ToString();
                                Time2.Visible = false;
                            }
                        }
                        else
                        {
                            fenpeiquerenren.Text = "未处理";
                            Image2.ImageUrl = "~/images/white-star.png";
                            fenpeiquerenshijian.Text = "";
                            Time2.Visible = false;
                        }
                        //项目负责状态
                        if (lst[0].xiangmufuzequerenren != null && lst[0].xiangmufuzequerenren != "" && lst[0].fuzetuihuiqueren == 1)
                        {
                            if (XIANGMU.WhetherLeader(lst[0].xiangmufuzequerenren.ToString()))
                            {
                                xiangmufuzequerenren.Text = string.Format("已确认");
                                Image3.ImageUrl = "~/images/bookmark-2.ico";
                                //项目负责日期
                                xiangmufuzequerenriqi.Text = lst[0].xiangmufuzequerenriqi.ToString();
                                //用时几天
                                DateTime DateTime3 = Convert.ToDateTime(lst[0].xiangmushoulishijian.ToString());//起始时间
                                DateTime DateTime4 = Convert.ToDateTime(lst[0].xiangmufuzequerenriqi.ToString());//结束时间
                                string dateDiff2 = null;
                                TimeSpan ts4 = new TimeSpan(DateTime3.Ticks);
                                TimeSpan ts5 = new TimeSpan(DateTime4.Ticks);
                                TimeSpan ts6 = ts4.Subtract(ts5).Duration();
                                int ts66 = NoticeService.ProNoticeDays(lst[0].xiangmufuzequerenriqi.ToString(), lst[0].xiangmushoulishijian.ToString());
                                //显示时间

                                dateDiff2 = "用时" + (ts6.Days + 1 - ts66).ToString() + "天";
                                Time3.Text = dateDiff2;
                                Time3.Visible = true;

                            }
                            else
                            {
                                xiangmufuzequerenren.Text = string.Format("已处理");
                                Image3.ImageUrl = "~/images/white-star.png";
                                //项目负责日期
                                xiangmufuzequerenriqi.Text = lst[0].xiangmufuzequerenriqi.ToString();
                                Time3.Visible = false;
                            }
                        }
                        else
                        {
                            xiangmufuzequerenren.Text = "未处理";
                            Image3.ImageUrl = "~/images/white-star.png";
                            xiangmufuzequerenriqi.Text = "";
                            Time3.Visible = false;
                        }
                        //现场踏查状态
                        if (lst[0].tachaquerenren != null && lst[0].tachaquerenren != "" && lst[0].tachaquerentuihui == 1)
                        {
                            if (XIANGMU.WhetherLeader(lst[0].tachaquerenren.ToString()))
                            {
                                tachaquerenren.Text = string.Format("已确认");
                                Image4.ImageUrl = "~/images/bookmark-2.ico";
                                //现场踏查日期
                                tachaquerenriqi.Text = lst[0].tachaquerenriqi.ToString();
                                //用时几天
                                DateTime DateTime5 = Convert.ToDateTime(lst[0].xiangmushoulishijian.ToString());//起始时间
                                DateTime DateTime6 = Convert.ToDateTime(lst[0].tachaquerenriqi.ToString());//结束时间
                                string dateDiff3 = null;
                                TimeSpan ts7 = new TimeSpan(DateTime5.Ticks);
                                TimeSpan ts8 = new TimeSpan(DateTime6.Ticks);
                                TimeSpan ts9 = ts7.Subtract(ts8).Duration();
                                int ts99 = NoticeService.ProNoticeDays(lst[0].tachaquerenriqi.ToString(), lst[0].xiangmushoulishijian.ToString());
                                //显示时间

                                dateDiff3 = "用时" + (ts9.Days + 1 - ts99).ToString() + "天";
                                Time4.Text = dateDiff3;
                                Time4.Visible = true;

                            }
                            else
                            {
                                tachaquerenren.Text = string.Format("已处理");
                                Image4.ImageUrl = "~/images/white-star.png";
                                //现场踏查日期
                                tachaquerenriqi.Text = lst[0].tachaquerenriqi.ToString();
                                Time4.Visible = false;
                            }
                        }
                        else
                        {
                            tachaquerenren.Text = "未处理";
                            Image4.ImageUrl = "~/images/white-star.png";
                            tachaquerenriqi.Text = "";
                            Time4.Visible = false;

                        }
                        //专家会议状态
                        if (lst[0].zhuanjiahuiyiquerenren != null && lst[0].zhuanjiahuiyiquerenren != "")
                        {
                            if (XIANGMU.WhetherLeader(lst[0].zhuanjiahuiyiquerenren.ToString()))
                            {
                                zhuanjiahuiyiquerenren.Text = string.Format("已确认");
                                Image5.ImageUrl = "~/images/bookmark-2.ico";
                                //专家会议时间
                                zhuanjiahuiyiquerenriqi.Text = lst[0].zhuanjiahuiyiquerenriqi.ToString();
                                //用时几天
                                DateTime DateTime7 = Convert.ToDateTime(lst[0].xiangmushoulishijian.ToString());//起始时间
                                DateTime DateTime8 = Convert.ToDateTime(lst[0].zhuanjiahuiyiquerenriqi.ToString());//结束时间
                                string dateDiff4 = null;
                                TimeSpan ts10 = new TimeSpan(DateTime7.Ticks);
                                TimeSpan ts11 = new TimeSpan(DateTime8.Ticks);
                                TimeSpan ts12 = ts10.Subtract(ts11).Duration();
                                int ts1212 = NoticeService.ProNoticeDays(lst[0].zhuanjiahuiyiquerenriqi.ToString(), lst[0].xiangmushoulishijian.ToString());
                                //显示时间

                                dateDiff4 = "用时" + (ts12.Days + 1 - ts1212).ToString() + "天";
                                Time5.Text = dateDiff4;
                                Time5.Visible = true;

                            }
                            else
                            {
                                zhuanjiahuiyiquerenren.Text = string.Format("已处理");
                                Image5.ImageUrl = "~/images/white-star.png";
                                //专家会议时间
                                zhuanjiahuiyiquerenriqi.Text = lst[0].zhuanjiahuiyiquerenriqi.ToString();
                                Time5.Visible = false;
                            }
                        }
                        else
                        {
                            zhuanjiahuiyiquerenren.Text = "未处理";
                            Image5.ImageUrl = "~/images/white-star.png";
                            zhuanjiahuiyiquerenriqi.Text = "";
                            Time5.Visible = false;
                        }
                        //评估意见状态
                        if (lst[0].pingguyijianchuliren != null && lst[0].pingguyijianchuliren != "")
                        {
                            if (XIANGMU.WhetherLeader(lst[0].pingguyijianchuliren.ToString()))
                            {
                                pingguyijian.Text = string.Format("已确认");
                                Image6.ImageUrl = "~/images/bookmark-2.ico";
                                //评估意见日期
                                pingguyijianchuliriqi.Text = lst[0].pingguyijianchuliriqi.ToString();
                                //用时几天
                                DateTime DateTime9 = Convert.ToDateTime(lst[0].xiangmushoulishijian.ToString());//起始时间
                                DateTime DateTime10 = Convert.ToDateTime(lst[0].pingguyijianchuliriqi.ToString());//结束时间
                                string dateDiff5 = null;
                                TimeSpan ts13 = new TimeSpan(DateTime9.Ticks);
                                TimeSpan ts14 = new TimeSpan(DateTime10.Ticks);
                                TimeSpan ts15 = ts13.Subtract(ts14).Duration();
                                int ts1515 = NoticeService.ProNoticeDays(lst[0].pingguyijianchuliriqi.ToString(), lst[0].xiangmushoulishijian.ToString());
                                //显示时间

                                dateDiff5 = "用时" + (ts15.Days + 1 - ts1515).ToString() + "天";
                                Time6.Text = dateDiff5;
                                Time6.Visible = true;

                            }
                            else
                            {
                                pingguyijian.Text = string.Format("已处理");
                                Image6.ImageUrl = "~/images/white-star.png";
                                //评估意见日期
                                pingguyijianchuliriqi.Text = lst[0].pingguyijianchuliriqi.ToString();
                                Time6.Visible = false;
                            }
                        }
                        else
                        {
                            pingguyijian.Text = "未处理";
                            Image6.ImageUrl = "~/images/white-star.png";
                            pingguyijianchuliriqi.Text = "";
                            Time6.Visible = false;
                        }
                        //项目考评状态
                        if (lst[0].xiangmukaopingchuliren != null && lst[0].xiangmukaopingchuliren != "")
                        {
                            if (XIANGMU.WhetherLeader(lst[0].xiangmukaopingchuliren.ToString()))
                            {
                                xiangmukaopingchuliren.Text = string.Format("已确认");
                                Image7.ImageUrl = "~/images/bookmark-2.ico";
                                //项目考评日期
                                xiangmukaopingchuliriqi.Text = lst[0].xiangmukaopingchuliriqi.ToString();
                                //用时几天
                                DateTime DateTime11 = Convert.ToDateTime(lst[0].xiangmushoulishijian.ToString());//起始时间
                                DateTime DateTime12 = Convert.ToDateTime(lst[0].xiangmukaopingchuliriqi.ToString());//结束时间
                                string dateDiff6 = null;
                                TimeSpan ts16 = new TimeSpan(DateTime11.Ticks);
                                TimeSpan ts17 = new TimeSpan(DateTime12.Ticks);
                                TimeSpan ts18 = ts16.Subtract(ts17).Duration();
                                int ts1818 = NoticeService.ProNoticeDays(lst[0].xiangmukaopingchuliriqi.ToString(), lst[0].xiangmushoulishijian.ToString());
                                //显示时间

                                dateDiff6 = "用时" + (ts18.Days + 1 - ts1818).ToString() + "天";
                                Time7.Text = dateDiff6;
                                Time7.Visible = true;

                            }
                            else
                            {
                                xiangmukaopingchuliren.Text = string.Format("已处理");
                                Image7.ImageUrl = "~/images/white-star.png";
                                //项目考评日期
                                xiangmukaopingchuliriqi.Text = lst[0].xiangmukaopingchuliriqi.ToString();
                                Time7.Visible = false;
                            }
                        }
                        else
                        {
                            xiangmukaopingchuliren.Text = "未处理";
                            Image7.ImageUrl = "~/images/white-star.png";
                            xiangmukaopingchuliriqi.Text = "";
                            Time7.Visible = false;
                        }
                        //汇总上报状态lst[0].reportpeople != null &&lst[0].reportpeople != "" && lst[0].reportstate != 2
                        if (lst[0].ReportingTrace != null && lst[0].ReportingTrace != "" && lst[0].tachaquerentuihui !=2)
                        {
                            if (XIANGMU.WhetherLeader(lst[0].reportpeople.ToString()))
                            {
                                reportstate.Text = string.Format("已确认");
                                Image8.ImageUrl = "~/images/bookmark-2.ico";
                                //汇总上报日期
                                reportdate.Text = lst[0].reportdate.ToString();
                                //用时几天
                                DateTime DateTime19 = Convert.ToDateTime(lst[0].xiangmushoulishijian.ToString());//起始时间
                                DateTime DateTime20 = Convert.ToDateTime(lst[0].reportdate.ToString());//结束时间
                                string dateDiff7 = null;
                                TimeSpan ts19 = new TimeSpan(DateTime19.Ticks);
                                TimeSpan ts20 = new TimeSpan(DateTime20.Ticks);
                                TimeSpan ts21 = ts19.Subtract(ts20).Duration();
                                int ts2121 = NoticeService.ProNoticeDays(lst[0].reportdate.ToString(), lst[0].xiangmushoulishijian.ToString());
                                //显示时间

                                dateDiff7 = "用时" + (ts21.Days + 1 - ts2121).ToString() + "天";
                                Time8.Text = dateDiff7;
                                Time8.Visible = true;

                            }
                            else
                            {
                                reportstate.Text = string.Format("已处理");
                                Image8.ImageUrl = "~/images/white-star.png";
                                //汇总上报日期
                                reportdate.Text = lst[0].reportdate.ToString();
                                Time8.Visible = false;
                            }
                        }
                        else
                        {
                            reportstate.Text = "未处理";
                            Image8.ImageUrl = "~/images/white-star.png";
                            reportdate.Text = "";
                            Time8.Visible = false;
                        }
                    }
                }
            }
            catch
            { }
        }
        #endregion
        protected void pjbgdv_RowDataBound(object sender, GridViewRowEventArgs e)
        {
            if (e.Row.RowType == DataControlRowType.DataRow)
            {
                e.Row.Cells[1].Attributes.Add("onmouseover", "c=this.style.backgroundColor;this.style.backgroundColor='#00A9FF'");
                e.Row.Cells[1].Attributes.Add("onmouseout", "this.style.backgroundColor=c");
                if (((Label)e.Row.FindControl("Label2")).Text == "1")
                    e.Row.BackColor = Color.Red;
            }
        }

        public void DBBing()
        {
            bool Leader = Session["roleid"].ToString().Contains("中心领导");
            bool Acceptance = Session["roleid"].ToString().Contains("受理人");
            bool ProHead = Session["roleid"].ToString().Contains("项目负责人");
            bool DepHead = Session["roleid"].ToString().Contains("部门负责人");
            HiddenField1.Value = " and projectreportstate=1 ";
            int Step = 0;
            if (Request.QueryString["Step"] != string.Empty && Request.QueryString["Step"] != null)
                Step = int.Parse(Request.QueryString["Step"]);
            switch (Step)
            {
                case 0:
                    HiddenField1.Value = string.Format("and js={0}", int.Parse(Session["userid"].ToString()));
                    break;
                case 1:
                    if (Leader == true || Acceptance == true)
                        HiddenField1.Value += "and shoulituihuishanchu is NULL";
                    break;
                case 2:
                    if (Leader == true)
                        HiddenField1.Value += "and shoulituihuishanchu=1 and fenpeiquerenren is NULL";
                    break;
                case 3:
                    if (Leader == true)
                        HiddenField1.Value += @"and shoulituihuishanchu=1 AND (fuzetuihuiqueren is NULL OR (fuzetuihuiqueren = 1 
                                AND NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=xiangmufuzequerenren))))";
                    if (DepHead == true)
                        HiddenField1.Value += string.Format(@"and fenpeiquerenren is not NULL AND fuzetuihuiqueren is NULL
                                                               AND FIND_IN_SET({0},(SELECT ed_User FROM tbs001_executivedepartment WHERE
                                                               ed_Name=fenpeizhixingbumen))", int.Parse(Session["ID"].ToString()));
                    break;
                case 4:
                    if (ProHead == true || DepHead == true)
                        HiddenField1.Value += string.Format("and pingshenxiangmufuzeren='{0}' and tachaquerentuihui is NULL and hantacha=1", Session["UserName"].ToString());
                    if (Leader == true)
                        HiddenField1.Value += @"and hantacha=1 and shoulituihuishanchu=1 and (tachaquerentuihui is NULL or (tachaquerentuihui=1 
                                                               and NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=tachaquerenren))))";
                    break;
                case 5:
                    if (ProHead == true || DepHead == true)
                        HiddenField1.Value += string.Format("and hanhuiyi=1 and pingshenxiangmufuzeren='{0}' and huiyiqueren is NULL", Session["UserName"].ToString());
                    if (Leader == true)
                        HiddenField1.Value += @"and hanhuiyi=1 and shoulituihuishanchu=1 and (huiyiqueren is NULL or (huiyiqueren=1 
                                                               and NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=zhuanjiahuiyiquerenren))))";
                    break;
                case 6:
                    if (ProHead == true || DepHead == true)
                        HiddenField1.Value += string.Format("and pingshenxiangmufuzeren='{0}' and queren is NULL", Session["UserName"].ToString());
                    if (Leader == true)
                        HiddenField1.Value += @"and shoulituihuishanchu=1 and (queren is NULL or (queren=1 
                                                               and NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=pingguyijianchuliren))))";
                    break;
                case 7:
                    if (ProHead == true || DepHead == true)
                        HiddenField1.Value += string.Format("and pingshenxiangmufuzeren='{0}' and xiangmukaopingchuliren is NULL", Session["UserName"].ToString());
                    if (Leader == true)
                        HiddenField1.Value += @"and shoulituihuishanchu=1 and (xiangmukaopingchuliren is NULL or (xiangmukaopingchuliren IS NOT NULL 
                                                               and NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=xiangmukaopingchuliren))))";
                    break;
                case 8:
                    if (ProHead == true || DepHead == true)
                        HiddenField1.Value += string.Format("and pingshenxiangmufuzeren='{0}' and reportstate is NULL", Session["UserName"].ToString());
                    if (Leader == true)
                        HiddenField1.Value += @"and shoulituihuishanchu=1 and (reportstate is NULL or (reportstate=1 
                                                               and NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=reportpeople))))";
                    break;
                case 9:
                    if (Leader == true)
                        HiddenField1.Value += @"and (reportstate is NULL or (reportstate=1 
                                                               and NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=reportpeople))))";
                    if (DepHead == true)
                        HiddenField1.Value += string.Format(@"and ((fenpeiquerenren is not NULL AND fuzetuihuiqueren is NULL
                                                               AND FIND_IN_SET({0},(SELECT ed_User FROM tbs001_executivedepartment WHERE
                                                               ed_Name=fenpeizhixingbumen))) or (pingshenxiangmufuzeren='{1}' and (reportstate is NULL or (reportstate=1 
                                                               and NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=reportpeople))))))", int.Parse(Session["ID"].ToString()), Session["UserName"].ToString());
                    if (ProHead == true)
                        HiddenField1.Value += string.Format(@"and pingshenxiangmufuzeren='{0}' and (reportstate is NULL or (reportstate=1 
                                                               and NOT FIND_IN_SET('中心领导',(SELECT RoleId FROM tbs001_user WHERE UserName=reportpeople))))", Session["UserName"].ToString());
                    break;
            }

            if (HiddenField1.Value == " and projectreportstate=1 ")
                HiddenField1.Value = "and 1=2";

            DataTable dt = EnvironmentManagerSystem.BLL.HuanJing.GetTable(HiddenField1.Value + " and ProjectName like '%" + txtsou.Text.Trim() + "%'");
            if (dt != null && dt.Rows.Count > 0)
            {
                Session["pjName"] = dt.Rows[0]["name"].ToString();
                Session["pjID"] = dt.Rows[0]["id"].ToString();
            }

            else
            {
                Session["pjName"] = "无";
                Session["pjID"] = "无";
            }
            pjbgdv.DataSource = dt;
            pjbgdv.DataBind();
        }

        //添加行单击事件
        protected override void Render(HtmlTextWriter writer)
        {
            foreach (GridViewRow r in pjbgdv.Rows)
            {
                if (r.RowType == DataControlRowType.DataRow)
                {
                    r.Cells[1].Attributes["onclick"] = ClientScript.GetPostBackEventReference(this.pjbgdv, "Select$" + r.RowIndex, true);
                    r.Cells[1].Attributes["title"] = "行单击事件";
                }
            }
            base.Render(writer);
        }

        //行选中事件
        protected void pjbgdv_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            if (pjbgdv.Rows[e.NewSelectedIndex].RowType == DataControlRowType.DataRow)
            {
                Session["pjName"] = ((Label)(pjbgdv.Rows[e.NewSelectedIndex].Cells[1].FindControl("Label1"))).Text.ToString();
                DataTable dt = EnvironmentManagerSystem.BLL.HuanJing.GetTable(HiddenField1.Value + " and ProjectName like '%" + txtsou.Text.Trim() + "%'");
                pjbgdv.DataSource = dt;
                pjbgdv.DataBind();
                Bind();
                Label1.Text = Session["pjName"].ToString();
            }

        }

        protected void pjbgdv_PageIndexChanging(object sender, GridViewPageEventArgs e)
        {
            pjbgdv.PageIndex = e.NewPageIndex;
        }

        protected void pjbgdv_PageIndexChanged(object sender, EventArgs e)
        {
            DBBing();
        }

        //搜索
        protected void txtsou_TextChanged(object sender, EventArgs e)
        {
            DBBing();
        }

        //创建项目
        protected void btn_Click(object sender, EventArgs e)
        {
            Session["pjName"] = "";
        }

        //编辑项目
        protected void pjbgdv_RowCommand(object sender, GridViewCommandEventArgs e)
        {
            if (e.CommandName.Equals("editi"))
            {
                Session["pjName"] = e.CommandArgument.ToString();
                Session["edit"] = "";
            }
        }
    }
}
